import { createRouter, createWebHistory } from 'vue-router'
const routes = [
  {
    path: '/question/add',   // 添加问题（给小程序用，webview嵌入）
    name: 'QuestionAdd',
    meta:{
      title:'发布问题',
      noWxAuto:true  // 不需要微信认证
    },
    component: () => import(/* webpackChunkName: "QuestionnaireDetails" */ '../views/applet/addQuestion')
  },
  {
    path: '/topic/add',   // 添加问题（给小程序用，webview嵌入）
    name: 'TopicAdd',
    meta:{
      title:'发表话题',
      noWxAuto:true  // 不需要微信认证
    },
    component: () => import(/* webpackChunkName: "QuestionnaireDetails" */ '../views/applet/addTopic')
  },
  {
    path: '/in/:id',   // 进入小程序调整页面
    name: 'InMin',
    meta:{
      title:'正在进入...',
      noWxAuto:true  // 不需要微信认证
    },
    component: () => import(/* webpackChunkName: "QuestionnaireDetails" */ '../views/applet/middleware')
  },
  {
    path: '/test',   // 测试
    name: 'Test',
    meta:{
      title:'测试',
      noWxAuto:true  // 不需要微信认证
    },
    component: () => import(/* webpackChunkName: "QuestionnaireDetails" */ '../views/applet/test')
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
